Decimal addition employing two sequential passes through a binary adder in one basic machine cycle

ABSTRACT

The present improvement makes use of a high-speed microprogrammed processor which has means for selecting the time duration of each basic machine cycle as the current control word is being executed. During a decimal add operation, the decimal operands are processed as normal binary values and the result is processed a second time in the binary adder to correct the result if necessary. The two ALU (arithmetic and logic unit) steps are executed during one machine cycle which is slightly longer than a normal binary add (or prior art decimal add) cycle; however, this arrangement improves overall processor performance by removing a stage of delay from the ALU input for all ALU operations. In addition, decimal error checking savings are effected.

United States Patent [151 3,648,246 Zurla 51 Mar. 7, 1972 [54] DECIMAL ADDITION EMPLOYING 3,234,523 2/1966 Buxt et al ..340/l72.5

TWO SEQUENTIAL PASSES THROUGH 3,434,l l4 3/l969 Aruldragasam et al.............340/l72.5

A BINARY ADDER IN ONE BASIC MACHINE CYCLE Primary ExaminerRaolfe B. Zache Assistant Examinerl-larvey E. Springborn [72] Inventor: Frank A. Zurla, Johnson City, NY. An neyHanifin n JanCin n John Black [73] Assignee: International Business Machines Corporatlon, Armonk, N.Y. [57] ABSTRACT The present improvement makes use of a high-speed [221 1970 microprogrammed processor which has means for selecting [2| I Appl. No.: 29,225 the time duration of each basic machine cycle as the current control word is being executed. During a decimal add operation, the decimal operands are processed as normal binary 521 u.s.c| ..340/172.s values and the result is process a second time in the binary [5|] Int. Cl v v ..G06I7/38 dd t c l m n if n Ce Th t O ALU [58 Field of Search ..23S/l69 no- 340/l72.5 a 6 e (arithmetic and logic unit) steps are executed during one machine cycle which is slightly longer than a normal binary [56] References Clted add (or prior art decimal add) cycle; however, this arrange- UNITED STATES PATENTS ment improves overall processor performance by removing a stage of delay from the ALU input for all ALU operations. In 3,302,183 H1967 Bennett et al ..340/172.5 ddi i d i l ror checking savings are effected. 3,521.043 711970 Thompson .235/170 3,290,494 12/1966 Schneberger et al. ..340/l72.5 X 5 Claims, 74 Drawing Figures ll 10 12 u D F m -ASM wn imn T 1 tumors am SEL J a l [3? i a LOCAL SIHCWES 1 MORE kSSEHBLER REGCSTER I 5 1 l0 5 5 o \s i 45 3 as 2 j EXTERNAL LAMBS mm m ASSEMBLER REMSTER 5mg are l l ASSEMBLER L i REGlSlER I a REGISTER A 42 B 25 isssuaien iSSEMBLER mm 4 L l I J l i 21 i ASSENBLER '1 20 31 Li. J

D REBlSTER Z REGISTER I PAIENIEDIIAR 7 I972 I FROII FIG. 21'] FIG. 2a

LOCAL FIG. 20

FIG. 2b FlG.2c

FIG. 20

FIG.2f FIG. 29

FIG. 2h

FIG.2I

FIG. 2

STORE ADDRESS ASSEMBLER FORCE III SELECT ()IIIIIIIIELaLT ;v

EXTERNAL REGISTER ADDRESS ASSEMBLER I NNEL a CHANNEL 4 CONTROLS G CHANNEL I SWITCHES PAIENTEUMAR 71.972 3,648,246

sum cunr 50 FIG. 2c

aaaaaaaaaaaa 192 OR OR OR OR i l i A REGIISTER 5 1 *2 5 a 8: 8| 8 8 aaaaaaaaa 0 OR Q OR 20R 50R F T C REGISTER 315 CROSSfi SHIFT 8 226 GATING GATING PAIENTEIIHIR 7:912 3,648,246

sum nsnr 56 FIG. 2d

OR OR OR I I I I B REGISTER I :1 I3 I BRANCH CIRCUITS CS/MS SDBI DRIVERS 315 CROSS 8 GATING SIIBI INVALID DECIMAL DIGIT CHECK PAIENIEUMAR 7 I912 SHEET 0 8 BF FIG. 2e

' ACB REGISTER a CONTROLS PATENTEUHAR H972 3.648246 SHEEI 070$ 50 SDMEAP RCEEASSSENBLY sosonsssuau a woaomuwoanamsu. a

a M OR I a r- C a T 8 OR m 4& g 2 a a a ,2 a s H t FROM smms PROTECT SYSTEM CLOCK r l I l 35 F I l SYSTEM MASTER CLOCK OSCILLATOR CYCLE LENGTH EQNIBQ R951?! 0 U 7- --c-- CONTROL DECODE commpolms ---f---mrouz.usmc.zea

s 212 T E omsuosnc REGISTER FIG. 2f

PATENTEDMAR (I972 3,648,246

sum canr 56 TRUE I93 OMPLEMENT EBI DRIVERS Z REG!STER 5' 0 REGIISTER E2 PATENTEDMAR 71912 3,648,246

sum OSUF 56 LOGICAL LOGICAL PAR ITY CHECK GENERATOR DECIMAL CORRECT CONTROLS 340-0 EBIO EBI RETRY BACKUP REGISTERS FIG. 2h

PATENTEUHAR H972 3,648,246

sum IDUF 5s CONTROLS Q '21 Mei 146D TRAP 8 PRTORITY MAIN STORAGE CONTROL STORAGE 1:; BEN 10 EVEN DR H3 (FIGZQ) i/HS R 3 DATA E C C 508 OUT suao DATA N E 34 MAIN SI TORAGE CONTROL STORAGE i03-\.- 1b CPU 10 ODD SECORDARY omsuosnc FUNCTIONS FIG. 2i

PAIENIEUHAR 71012 3,648,246

225 HIMEOLY CYCLE 21mg ALLOW 0 TIME as 05011111011 +0 11111 01111 -|NVERT 05C -U TIME DELAY +c10c11s111111Rs1 +0 11111 -180 ns CYCLE -0 TIME VARIABLE CYCLE +1 a -1 +111s11 CLOCK +1 11111 01111 425115 01c11- -111111 01111 210115 01011 +211111 E -211111 -+2 1111101111 2 11111 01111 FIG. 3

SHEET 12 0F 56 PATENTEDMR 7 I972 q a? m w $3 mix 6 r mo :1 j 85 0-20 E12 6 mm H IIQEO co as: E r l m o W 8 o E n: E E u o w 235 E U I a s; E a 2: 88 38 L J T V w 1 I wim E: w w 8 a at 4 8 6 J 3m 2 m h z i w b E Q 18 sue r E m E as as H N: 52085 ST. m0 0 l m 2 as E .12 mew in, 0 go NE. 6 1 z I 0 2 @235 1 m0 aw .720 s T Q j .kll an m l v 8 w 3 ii an 35 m \E @5530 :T u so- A l. IJ mmm immou G u M :EQN 58 L 53 IE: 5 w 25 H w w an mo m an an m we a 5 :6 Sq m 2: .m 0 .AIJAQS a l an enig a 1 mo ssas an v 8- 81 v sss lllll E 6 415528 g 2 m It KN 30528 I823 526 50 6 

1. Apparatus for performing decimal arithmetic operation in accordance with a stored program by two binary arithmetic operations in one microprogram control word execution cycle comprising a main storage unit having stored therein data, including decimal operands, and program instructions, first and second local storage units each having a capacity smaller than and a speed higher than those features of the main storage unit, an arithmetic and logic unit including a binary adder for processing data, a control storage unit having stored therein microprogram control words, including a decimal add control word, arranged to implement the execution of at least certain of said program instructions, first decode circuits operated in accordance with certain of the control words to control the transfer of data including decimal operands from the main storage unit to the local storage units preparatory to processing of the data and the decimal operands in the arithmetic and logic unit and to control the transfer of processed data and decimal operands from the local storage units to the main storage unit, second decode circuits operated in accordance with other of the control words, which include the decimal add control word, during one control word execution cycle to control the transfer of data from the local storage units to the arithmetic and logic unit for processing and to control the transfer of processed data from the arithmetic and logic unit to the local storage units during the next control word execution cycle, the control storage unit including an addressing mechanism, data storage devices and an output bus operated to access, read out and apply said control words to said decode circuits within a time interval substantially less than any one control word execution cycle, a variable cycle length clock producing a series of cyclical output pulses for executing each control word, third decode circuits responsive to selected bits in each control word causing the clock to produce only so many of the output pulses in the series as are required to effect execution of the control word before starting a next succeeding series of output pulses for a next control word, said second decode circuits being responsive to the decimal add control word during one execution cycle to access first and second of the decimal operands from the first and second local storage units and to gate the operands into the binary adder for processing, means for recirculating the result of said operand processing back into the binary adder during said one cycle, and correction decode circuits responsive during said one cycle to the decimal add control word and to the numeric value of said result to gate a selected constant into the arithmetic and logic unit for producing a corrected result.
 2. Apparatus for executing decimal arithmetic operations in accordance with a stored program by two binary arithmetic operations in one microprogram control word execution cycle comprising a main storage unit having stored therein data, including decimal operands, and program instructions, first and second local storage units each having a capacity smaller than and a speed higher than those features of the main storage unit, means for transferring the data, including decimal operands, from the main storage unit to the local storage units, an arithmetic and logic unit including a binary adder for processing data, a control storage unit having stored therein microprogram control words, including a decimal add control word, arranged to implement the execution of at least certain of said program instructions, the control storage unit including an addressing mechanism, datA storage devices and an output bus operated to access, read out and supply said control words within a time interval substantially less than any one control word execution cycle, a variable cycle length clock producing a series of cyclical output pulses for executing each control word, first means responsive to selected bits in the decimal add control word for causing the clock to produce only so many of the output pulses in the series as are required to effect execution of the control word before starting a next succeeding series of output pulses for a next control word, second means responsive during one execution cycle to the decimal add control word for transferring first and second of the decimal operands from the first and second local storage units to the binary adder to produce a first result, third means for recirculating said first result of said operand processing back into the binary adder during said one cycle, and correction means responsive during said one cycle to the decimal add control word and to the numeric value of said first result to gate a selected constant into the arithmetic and logic unit for producing a corrected result.
 3. The apparatus of claim 2 further comprising means for transferring the corrected result to corresponding storage positions of the first and second local storage units.
 4. The apparatus of claim 2 further comprising binary add checking circuits effective to check for add processing errors in the first and corrected results.
 5. The apparatus of claim 2 further comprising true-complement circuits interposed between the binary adder and the second, third and fourth means to provide both true and complement decimal add functions. 